package cn.it.demo.controller;

import cn.it.mvc.framework.anno.MyAutowired;
import cn.it.mvc.framework.anno.MyController;
import cn.it.mvc.framework.anno.MyRequestMapping;
import cn.it.demo.service.IDemoService;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@MyController
@MyRequestMapping("/demo")
public class DemoController {

    @MyAutowired
    private IDemoService demoService;

    @MyRequestMapping("/test")
    public String test(HttpServletRequest request, HttpServletResponse response, String name) {
        return demoService.query(name);
    }
}
